AcquireExtension
TheAcquireExtension
method returns a reference to the specified extension object.
ODExtension AcquireExtension (in ODType extensionName);
extensionName
- The name of the extension to acquire. The value of
extensionName
must be one of the following:kODExtSemanticInterface
,kODSettingsExtension
, or a part-specific string.- return value
- A reference to the specified extension object.
DISCUSSION
Your part calls this method to obtain a reference to an extension object with the specified extension type. If the subclass does not support the specified extension, this method raises an exception. TheODObject
class has no inherent extensions of its own and therefore always raises an exception.Your override of this method should increment the reference count of the returned extension. When you have finished using that extension, you should call its
Release
method.OVERRIDING
Your subclass ofODPart
can override this method if your part supports extensions. If your part does not support the specified extension, your override method must call its inheritedAcquireExtension
method at the end of your implementation.EXCEPTIONS
kODErrUnsupportedExtension
- The specified extension is not supported by this object.
SEE ALSO
TheODObject::HasExtension
method (page 441).
TheODObject::ReleaseExtension
method (page 444).
TheODPart
class (page 459).
Table 2-1 on page 89 in OpenDoc Programmer's Guide.
"Using an Extension" on page 444 in OpenDoc Programmer's Guide.
Table 11-1 on page 466 in OpenDoc Programmer's Guide.
"Making Your Semantic-Interface Extension Available" on page 433 in OpenDoc Programmer's Guide.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help